﻿using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Drawing;
using System.Text;
using System.Web.Mvc;
using System.IO;
using System.Data.Objects;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using FILSTARTUPS_CMS.Models;

namespace FILSTARTUPS_CMS.Controllers
{
    [Authorize]
    public class RoutingController : Controller
    {
        FilStartUpsEntities cms_dbconnect = new FilStartUpsEntities();
        //
        // GET: /Routing/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Create()
        {
            return View();
        }
        [HttpPost]
        public ActionResult Create(RoutingType routing)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    cms_dbconnect.RoutingType.Add(routing);
                    cms_dbconnect.SaveChanges();
                    return RedirectToAction("Index", "Post");
                }

            }
            catch
            {

            }
            return View();
        }
        public ActionResult Edit(int id)
        {
            return View();
        }

    }
}
